package hello;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
public class MyController {

    @RequestMapping(value = {"/","welcomePage"})
    public String welcomePage(Map map) {
        map.put("message", "欢迎页");
        return "page";
    }

    @RequestMapping(value = "guestPage")
    public String userPage(Map map) {
        map.put("message", "访客页");
        return "page";
    }

    @RequestMapping(value = "adminPage")
    public String adminPage(Map map) {
        map.put("message", "管理页");
        return "page";
    }
}
